declare const window: any;
// ? 全局默认配置项

interface MenuList {
  id: number;
  title: string;
  name: string;
  needMatch: boolean;
}

// 首页地址（默认）
export const HOME_URL: string = "/home/index";

// 登录页地址（默认）
export const LOGIN_URL: string = "/login";

// 默认主题颜色
export const DEFAULT_PRIMARY: string = "#21B6A4";

// 路由白名单地址（必须是本地存在的路由 staticRouter.ts 中）
export const ROUTER_WHITE_LIST: string[] = ["/500"];

// 高德地图 key
export const AMAP_MAP_KEY: string = "";

// 百度地图 key
export const BAIDU_MAP_KEY: string = "";

// 主菜单配置
export const MENU_LIST: MenuList[] = [
  {
    id: 1,
    title: "系统管理",
    name: "SysManage",
    needMatch: true
  },
  {
    id: 2,
    title: "设备管理",
    name: "DeviceManage",
    needMatch: true
  },

  {
    id: 3,
    title: "设备调试",
    name: "DeviceControlManage",
    needMatch: true
  },
  {
    id: 4,
    title: "设备运维",
    name: "DeviceDevOpsManage",
    needMatch: true
  },
  {
    id: 5,
    title: "数字化教材",
    name: "TextbookManage",
    needMatch: true
  },
  {
    id: 6,
    title: "在线服务",
    name: "OnlineServeManage",
    needMatch: false
  },
  {
    id: 7,
    title: "教学资源",
    name: "ExamManage",
    needMatch: true
  },
  {
    id: 8,
    title: "交互展示",
    name: "BannerShow",
    needMatch: true
  },
  {
    id: 9,
    title: "实验报告",
    name: "AppDataManage",
    needMatch: true
  }
];

// 主菜单结构
export const TABS_MENU_LIST = [
  {
    key: 0,
    values: []
  },
  {
    key: 1,
    values: []
  },
  {
    key: 2,
    values: []
  },
  {
    key: 3,
    values: []
  },
  {
    key: 4,
    values: []
  },
  {
    key: 5,
    values: []
  },
  {
    key: 6,
    values: []
  },
  {
    key: 7,
    values: []
  },
  {
    key: 8,
    values: []
  }
];

// 根地址
export const VITE_API_URL = window.VITE_API_URL || import.meta.env.VITE_API_URL;

// 菜单白名单  不需要菜单权限校验
export const WHITE_MENU_LIST = ["forum", "forumDtl", "bannerShow", "cabinetLayout"];

// 过滤不包含菜单权限的特殊情况
export const FILTER_MENU_LIST = new Map([
  ["student", []],
  ["teacher", ["ExamTestSelfList"]],
  ["manager", ["ExamTestSelfList"]]
]);
